package com.headwind.mq.rabbitmq.controller;

import com.headwind.mq.rabbitmq.ReceiverMessage;
import com.headwind.mq.rabbitmq.SendMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : Headwind
 * @version : 1.0
 * @date : Created in 2020/8/10
 * @description : 消息验证
 */
@RestController
public class MessageController {
    private final SendMessage sendMessage;
    private final ReceiverMessage receiverMessage;

    @Autowired
    public MessageController(SendMessage sendMessage, ReceiverMessage receiverMessage) {
        this.sendMessage = sendMessage;
        this.receiverMessage = receiverMessage;
    }

    @GetMapping("/send")
    public void sendMessage() {
        sendMessage.send();
    }

}
